Use [NSGraphicsContext CGContext] instead of graphicsPort after Yosemite.
authorJohn Ralls <jralls@ceridwen.us>
Mon, 15 Oct 2018 17:45:57 +0000 (10:45 -0700)
committerJohn Ralls <jralls@ceridwen.us>
Thu, 1 Nov 2018 22:38:43 +0000 (15:38 -0700)
gdk/quartz/gdksurface-quartz.c

index c635a6386a0358e47c130e06ac58129708e27722..ff7c62a688c11f75ea1652beb0b9513512f55cba 100644 (file)
@@ -134,8 +134,10 @@ gdk_surface_impl_quartz_get_context (GdkSurfaceImplQuartz *surface_impl,
       if (![surface_impl->view lockFocusIfCanDraw])
         return NULL;
     }
-
-  cg_context = [[NSGraphicsContext currentContext] graphicsPort];
+  if (gdk_quartz_osx_version () < GDK_OSX_YOSEMITE)
+       cg_context = [[NSGraphicsContext currentContext] graphicsPort];
+  else
+       cg_context = [[NSGraphicsContext currentContext] CGContext];
   CGContextSaveGState (cg_context);
   CGContextSetAllowsAntialiasing (cg_context, antialias);